package com.aoip.telemetry.telemetry.entity.element;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 本表存储元素解析入库需要的额外字段配置信息，如监测点编码，时间等。
 *
 * @author chenbai
 * @since 2021-08-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("element_addition_filed_config")
@ApiModel(value = "entity对象", description = "本表存储元素解析入库需要的额外字段配置信息，如监测点编码，时间等。")
public class ElementAdditionFiledConfig implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty("数据id")
    private String id;

    @ApiModelProperty(value = "插入表名")
    @TableField("table_name")
    private String tableName;

    @ApiModelProperty(value = "表字段名")
    @TableField("field_name")
    private String fieldName;

    @ApiModelProperty(value = "字段描述")
    @TableField("method_desc")
    private String methodDesc;

    @ApiModelProperty(value = "遥测平台判断表名")
    @TableField("telemetry_table_name")
    private String telemetryTableName;

    @ApiModelProperty(value = "遥测平台提供的字段名")
    @TableField("telemetry_field_name")
    private String telemetryFieldName;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modifyTime;

    @ApiModelProperty(value = "逻辑删除字段，0已删除，1未删除")
    @TableField(value = "del_flag", fill = FieldFill.INSERT_UPDATE)
    @TableLogic
    private Integer delFlag;


}
